﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="NotaCreditoItemGrid.ascx.cs" 
Inherits="UILGestion.VentaAdmin.DocumentoVenta.NotaCreditoItemGrid" %>
 
  <%@ Register assembly="WebLib" namespace="WebLib" tagprefix="lib" %>
 <input id="internalID" type="hidden" runat="server" />
  <input id="idColeccion" type="hidden" runat="server" />
  <input id="concepto" type="hidden" runat="server" />
  
  



   <asp:GridView ID="itemGridView" runat="server" 
   DataKeyNames="idInternal" 
   ShowFooter="true"
    onrowcancelingedit="CancelItem" 
                            onrowediting="EditItem" 
                            OnRowUpdating="UpdateItem" 
                                 ShowHeaderWhenEmpty="true" SkinID="GridView" >
                                 <Columns>
                             
                                     <asp:TemplateField HeaderStyle-Width="70px" HeaderText="Codigo">
                                         <ItemTemplate>
                                             <asp:Label ID="codigoLabel" runat="server" Text='<%# Eval("codigo")%>' 
                                                 Width="70px"></asp:Label>
                                         </ItemTemplate>
                                         <EditItemTemplate>
                                             <asp:Label ID="codigoEditTextBox" runat="server" BackColor="Transparent" 
                                                 Text='<%# Eval("codigo")%>'  />
                                         </EditItemTemplate>
                                         <FooterTemplate>
                                             <lib:Input ID="codigoEditTextBox" runat="server" BackColor="Transparent" 
                                                 ReadOnly="true" Width="70px" />
                                         </FooterTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField ControlStyle-Width="450px" HeaderText="Descripcion">
                                         <EditItemTemplate>
                                             <lib:Input ID="descripcionEditTextBox" runat="server"  TextMode="MultiLine" Height="45px"
                                                 Text='<%# Eval("descripcion")%>' Width="100%" />
                                         </EditItemTemplate>
                                         <FooterTemplate>
                                         <lib:Input ID="descripcionEditTextBox" runat="server"
                                                 Width="100%"></lib:Input>
                                            
                                           
                                         </FooterTemplate>
                                         <ItemTemplate>
                                             <asp:Label ID="descripcionLabel" runat="server" 
                                                 Text='<%# Eval("descripcion")%>'></asp:Label>
                                         </ItemTemplate>
                                     </asp:TemplateField>
                                     <asp:TemplateField ControlStyle-Width="120px" HeaderStyle-Width="120px" 
                                         HeaderText="Total" ItemStyle-HorizontalAlign="Right">
                                         <ItemTemplate>
                                             <asp:Label ID="totalLabel" runat="server" Text='<%# Eval("totalStr")%>' />
                                         </ItemTemplate>
                                         <EditItemTemplate>
                                         <asp:Label ID="totalTextBox" runat="server" Text='<%# Eval("totalStr")%>' />
                                            <%-- <lib:Input ID="totalTextBox" runat="server"  
                                                 DataType="Double"  Text='<%# Eval("totalStr")%>' Width="100%"></lib:Input>--%>
                                         </EditItemTemplate>
                                         <FooterTemplate>
                                             <lib:Input ID="totalTextBox" runat="server" BackColor="Transparent" 
                                                  DataType="Double"  Width="120px"></lib:Input>
                                         </FooterTemplate>
                                     </asp:TemplateField>
                                          
                            <asp:CommandField ButtonType="Image" CancelImageUrl="~/Images/cancel.gif" 
                            EditImageUrl="~/Images/edit.gif" ShowEditButton="true" 
                            UpdateImageUrl="~/Images/update.gif" />
                         
                                   
                                   <asp:TemplateField>
                                         <ItemTemplate>
                                         <asp:ImageButton ID="lnkRemove" runat="server" BorderColor="Control" 
                                                 CommandArgument='<%# Eval("idInternal")%>' ImageUrl="~/Images/delete.gif" 
                                                 OnClick="DeleteItem" 
                                                 OnClientClick="return confirm('Usted quiere eliminar?')" />
                                            

                                         </ItemTemplate>


                                           <FooterTemplate>
                                              <asp:LinkButton ID="btnAdd" runat="server" ForeColor="Blue" Text="Añadir" OnClick="AddItem" > </asp:LinkButton>
                                             </FooterTemplate>
                                     </asp:TemplateField>



                                 </Columns>
                             </asp:GridView>

